﻿using UnityEngine;

[RequireComponent(typeof(Animator))]
public class AnimationController : ActionController
{
    private Animator animator;

    protected override void OnStart()
    {
        animator = GetComponent<Animator>();
    }

    private void FixedUpdate()
    {
        SetAnimator();
    }

    private void SetAnimator()
    {
        animator.SetBool("wriggle", player.Wriggling);
        animator.SetBool("grounded", player.Grounded);
        animator.SetBool("isdashing", player.b_isDashing);
        animator.SetBool("die", player.b_died);
    }
}
